﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Microsoft.Forums.SyncService
{
    /// <summary>
    /// The result of an asynchronous Thread Synchronization
    /// </summary>
    public class SynchronizeThreadCompletedEventArgs : EventArgs
    {
        /// <summary>
        /// Constructs the Completed event args
        /// </summary>
        /// <param name="forumId">The forum id.</param>
        /// <param name="threadId">The thread id.</param>
        /// <param name="threadSummary">The thread summary.</param>
        /// <param name="exception">The exception.</param>
        public SynchronizeThreadCompletedEventArgs(
            Guid forumId,
            Guid threadId,
            SynchronizeThreadSummary threadSummary,
            Exception exception)
        {
            SynchronizeThreadSummary = threadSummary;
            ForumId = forumId;
            ThreadId = threadId;
            Error = exception;
        }

        public Exception Error
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the forum id.
        /// </summary>
        /// <value>The forum id.</value>
        public Guid ForumId
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the thread id.
        /// </summary>
        /// <value>The thread id.</value>
        public Guid ThreadId
        {
            get;
            private set;
        }

        /// <summary>
        /// The summary of what was synchronized
        /// </summary>
        public SynchronizeThreadSummary SynchronizeThreadSummary
        {
            get;
            set;
        }
    }
}
